<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css">

<%@ include file="/commons/validation.jsp" %>

<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/ajaxException.js"></script>

<script type="text/javascript">
	var windowObject = null;
	function openSelectHouseInfo(){
		var url = "${ctx}/common_commonAction.do?method=chooseMultiHouseWithBuild&parentFrame=buildAnewFrame"
		top.windowOpen(url,"selectHouse","${key.charge_note_buildAnew_houseSelect}",600,800,true,"");
	}

	function setHouseInfo(houseInfo){
		var houseIdArray = new Array();
		var houseNumber = new Array();
		for(i = 0; i < houseInfo.length; i++){
			houseIdArray[houseIdArray.length] = houseInfo[i].houseId ;
			houseNumber[houseNumber.length] = houseInfo[i].houseNumber;
		}
		$("houseIds").value = houseIdArray.join(",");
		$("houseNubmer").value = houseNumber.join(",");
	}
	function mySubmit(){
		var url = "${ctx}/charge_noteAction.do?method=buildNotesAnew";
		var param = "houseIds=" + $("houseIds").value;
		windowObject.ajaxSubmit(url,param,function(result){
			if(result.responseText == "true"){
				SuccessAlert("${key.charge_note_buildAnew_success}");
				findFrame("main").flustList();
				windowClose();
			}
		});
	}

	function init(){
		windowObject = new WindowObject("noteBuildAnewForm",["btn1_22","btn1_32"]);
	}
</script>
</head>

<body onload="init();">
 <form id="noteBuildAnewForm" action="" method="post" class="required-validate">
 	<input type="hidden" id="houseIds" value="">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="121"><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"><span class="window_head_intext">${key.charge_note_buildAnew}</span></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td class="content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="aux_outtable_color"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">

          <tr>
            <td class="aux_intable_td1">${key.charge_note_buildAnew_period}：</td>
            <td class="aux_intable_td2">${periodVO.period}</td>
            </tr>

          <tr>
            <td class="aux_intable_td1"><span id="roomnum">${key.charge_note_buildAnew_houseSelect2}：</span></td>
            <td class="aux_intable_require">

		            <table border="0" cellspacing="0" cellpadding="0">
		              <tr>
		                <td >
		                	<input id="houseNubmer" name="houseNubmer" type="text" class="inputtext required" afterInsert="spanImage" value="" readonly="readonly" size="16">
		                </td>
		                <td width="4">&nbsp;</td>
		                <td >
		                	<a href="#"  onClick="openSelectHouseInfo();">
		                		<img src="${ctx}/images/ico_houesno.GIF" alt="${key.charge_note_buildAnew_houseSelect_please}" border="0">
		                	</a>
		                	<span id="spanImage"></span>
		                </td>
		              </tr>
		            </table>
            </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="left" class="window_footer"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
        <td class="btn_between_space">&nbsp;</td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_21"></td>
              <td class="buttonOffMiddle" id="btn1_22" onClick="mySubmit();" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)" onBlur="btn_change(2)"><img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom"> ${key.ok}</td>
              <td class="buttonOffRight" id="btn1_23"></td>
            </tr>
        </table></td>
        <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onClick="windowObject.winClose(true);" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onBlur="btn_change(3)"><img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom">${key.cancel}</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>